package com.huike.web.controller.contract;

import com.huike.common.core.domain.AjaxResult;
import com.huike.contract.service.FileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/common")
public class TbContractUploadController {

    @Autowired
    public FileService fileService;

    @PostMapping("/upload")
    public AjaxResult uploadFile (MultipartFile file){

        return AjaxResult.success(fileService.upload(file));

    }
}
